package com.redoor.app.stake.basicdata.dao;

import com.redoor.app.stake.basicdata.model.BaseParkingSpace;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseParkingSpaceCriteria;
import com.redoor.app.stake.basicdata.model.serviceModel.BaseParkingSpaceServiceBean;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface BaseParkingSpaceMapper extends Mapper<BaseParkingSpace> {

    /**
     * 根据停车区uuid查询停车位信息
     * @Author zhangYiHang
     * @Date 2018/3/21 15:07
     */
    List<BaseParkingSpaceServiceBean> qryParkingSpaceByParkingAreaUuid(@Param("parkingAreaUuid")String parkingAreaUuid);
    /**
     *  根据停车区uuid查停车位编码
     *   在生成新停车位编码时候使用
     * @author ZhangMumu
     * @date 2018/3/28 0028 16:51
     * @param
     * @return
     */
    List<String> qryParkingSpaceCodeByParkingAreaUuid(@Param("parkingAreaUuid")String parkingAreaUuid);

    /**
     *  根据停車區uuid停车区下已经绑定枪的所有停车位
     *
     * @author ZhangMumu
     * @date 2018/3/22 0022 14:56
     * @param
     * @return
     */
    List<BaseParkingSpaceServiceBean> qryParkingSpaceBindedChargerByParkingAreaUuid(@Param("parkingAreaUuid")String parkingAreaUuid);

    /**
     * 获取停车位列表
     *
     * @author ZhangMumu
     * @date 2018/3/21 16:37
     * @param
     * @return
     */
    List<BaseParkingSpaceServiceBean> qryParkingSpaceList(BaseParkingSpaceCriteria criteria);
    /**  
     *  获取停车位数量
     *   
     * @author ZhangMumu  
     * @date 2018/3/21 0021 17:55  
     * @param   
     * @return   
     */  
    int qryParkingSpaceCnt(BaseParkingSpaceCriteria criteria);
    /**
     * 停车位详情页面
     * @Author zhangYiHang
     * @Date 2018/4/3 15:49
     * @Param
     */
    BaseParkingSpaceServiceBean qryParkingSpaceByUuid(@Param("uuid") String uuid);
    /**
     * 根据停车区uuid删除停车位
     * @Author zhangYiHang
     * @Date 2018/4/14 21:31
     * @Param
     */
    int deleteSpaceByAreaUuid(@Param("areaUuid") String uuid);
}